package com.example.demo.controller;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
public class DemoController {
    @RequestMapping("/getData")
    public String login() {
        System.out.println("收到了get请求");
        return "get login success";
    }
    @RequestMapping("/postData")
    public String postData() {
        System.out.println("收到了post请求");
        return "post login success";
    }
}
